$('#lxcsearch div:eq(1)').css('display','none');
$('#lxcbox').css('position','static');
var allData ={};
var arrUrl = ['/allLogin/telInfo','/allLogin/psdInfo','/allLogin/regInfo','/allLogin/resetInfo'];
var arrIndex = parseInt($("#btnSub").attr('urlIndex'));
$("#btnSub").click(function () {
    $('.aValue').each(function () {
        allData[$(this).prop('name')] = $(this).val();
    })
    $.ajax({
        url: arrUrl[arrIndex],
        type: 'post',
        dataType: 'json',
        data: allData,
        success: function (data) {
            console.log(data);
            if (data.code == 200){
                localStorage.setItem('userID',data.userID[0].id);
                location.href = '/'
            }else if (data.code == 'no exist'){
                alert('登录用户不存在！')
            }else if (data.code == 'regsuccess'){
                location.href = '/psdLogin'
            }else if(data.code == 'exist'){
                alert('注册用户已存在')
            }else if(data.code == 'psderr'){
                alert('密码错误！')
            }else if(data.code == 'resetOK'){
                console.log('重置密码成功！')
                location.href = '/psdLogin'
            }
        }
    })
})